function outputdata = make2Dgraphs(paramA,paramB)

clc
param3 = [];

% start exporting console output to txt
% delete([param1 '_' param2 '.txt']); % disabled automatic deletion of old
% logs for other users to avoid unwanted side effects - HM

%diary(['Output/' paramA '_' paramB '.txt']); % disabled diary function. Enable if
% needed. See also diabled diary('off') line at the end of this file. - HM

% masks without OC
fullmask = 3;
graymask = 4;
whitemask = 5; % 2 = WM including the optical chiasm

% Process full slice
fig=figure(1);
set(fig,'Position',[0 0 1000 1000])
disp(['Processing ' paramA '_' paramB '_fullslice']);
[outputdata.fullslice.x,...
    outputdata.fullslice.y,...
    outputdata.fullslice.z,...
    outputdata.fullslice.regressionresult,...
    outputdata.fullslice.x_unprocessed,...
    outputdata.fullslice.y_unprocessed,...
    outputdata.fullslice.z_unprocessed,...
    outputdata.fullslice.GMmask,...
    outputdata.fullslice.WMmask] = marmplots(paramA,paramB,param3,fullmask,1);

print(['Output/' paramA '_' paramB '_fullslice'],'-dpng','-r300');

% Process gray matter only
disp(['Processing ' paramA '_' paramB '_GM']);
fig=figure(2);
set(fig,'Position',[0 0 1000 1000])
[outputdata.GM.x,...
    outputdata.GM.y,...
    outputdata.GM.z,...
    outputdata.GM.regressionresult,...
    outputdata.GM.x_unprocessed,...
    outputdata.GM.y_unprocessed,...
    outputdata.GM.z_unprocessed,...
    outputdata.GM.GMmask,...
    outputdata.GM.WMmask] = marmplots(paramA,paramB,param3,graymask,2);

print(['Output/' paramA '_' paramB '_GM'],'-dpng','-r300');

% Process white matter only
disp(['Processing ' paramA '_' paramB '_WM']);
fig=figure(3);
set(fig,'Position',[0 0 1000 1000])
[outputdata.WM.x,...
    outputdata.WM.y,...
    outputdata.WM.z,...
    outputdata.WM.regressionresult,...
    outputdata.WM.x_unprocessed,...
    outputdata.WM.y_unprocessed,...
    outputdata.WM.z_unprocessed,...
    outputdata.WM.GMmask,...
    outputdata.WM.WMmask] = marmplots(paramA,paramB,param3,whitemask,3);

print(['Output/' paramA '_' paramB '_WM'],'-dpng','-r300');

%diary('off');